package com.morningstar.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @className: ExternalConfiguration
 * @description: 从pom文件读取配置属性映射到当前实体类
 * @author: LiuZhenHe
 * @date: 2023/10/16 11:20
 **/
@Component
@ConfigurationProperties("cloud")
@PropertySource(value = "classpath:application.properties",encoding = "UTF-8")
@Data
public class ExternalConfiguration {
    private String address;
    private String account;
    private String password;
    private String port;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
